<template>
  <t-card class="slit-card" :bordered="false">
    <div v-if="$slots.slitLeft" class="slit-card-left">
      <slot name="slitLeft"></slot>
    </div>
    <div v-if="$slots.slitContent" class="slit-card-content">
      <slot name="slitContent"></slot>
    </div>

    <div v-if="$slots.default" class="slit-card-body">
      <slot name="default"></slot>
    </div>
  </t-card>
</template>

<script setup lang="ts">

defineProps({

  // 左侧宽度
  leftWidth: {
    type: String,
    default: '30%'
  }
})
</script>

<style scoped lang="less">
.slit-card {
  height: 100%;

  :deep(.t-card__body) {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: row;
  }

  &-left {
    width: v-bind(leftWidth);
    padding: 24px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--td-brand-color-2)
  }

  &-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
  }

  &-body {
    padding: 15px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

}
</style>
